﻿using Dict.DataModel;
using System.Collections;
using UnityEngine;
namespace Story
{
    class StepPositionCharactor : StepBase
    {
        private float startTime;
        protected override void OnStart()
        {
            var charactor = GetCharactor(actionParam1);
            Vector3 pos= GetPosition(actionParam2); ;

            float time = 0f;

            float.TryParse(actionParam3, out time);

            var tweenAction = storyManager.gameObject.AddMissingComponent<TweenAction>();

            var a1 = new TweenActionMove(charactor.transform, pos, time, true);
            tweenAction.RunAction(a1);

            End();
        }


    }
}